﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace ObjectLibrary
{
    public class Move
    {
        public enum Strike { PUNCH, KICK };
        Strike _strikeType;


        private string _actionName;
        private string _reActionName;
        Vector3 _dPosition;
        float _dRotation;
        private int _damage;
        private Move _nextKickMove;
        private Move _nextPunchMove;


        public float DRotation
        {
            get { return _dRotation; }
            set { _dRotation = value; }
        }
        public Vector3 DPosition
        {
            get { return _dPosition; }
            set { _dPosition = value; }
        }
        public string ReActionName
        {
            get { return _reActionName; }
            set { _reActionName = value; }
        }
        public string ActionName
        {
            get { return _actionName; }
            set { _actionName = value; }
        }
        public int Damage
        {
            get { return _damage; }
            set { _damage = value; }
        }
        internal Move NextPunchMove
        {
            get { return _nextPunchMove; }
            set { _nextPunchMove = value; }
        }
        internal Move NextKickMove
        {
            get { return _nextKickMove; }
            set { _nextKickMove = value; }
        }
        public Strike StrikeType
        {
            get { return _strikeType; }
            set { _strikeType = value; }
        }
        public Move()
        {
            _actionName = "";
            _reActionName = "";
            _dPosition = Vector3.Zero;
            _dRotation = 0;

        }
        public Move(string actionName, string reActionName, Vector3 dPos, float dRotation, int damage,Strike type)
        {
            _actionName = actionName;
            _reActionName = reActionName;
            _dPosition = dPos;
            _dRotation = dRotation;
            _damage = damage;
            _strikeType = type;
        }
        public Move(Move clone)
        {
            if (clone == null)
                return;
            _actionName = clone._actionName;
            _reActionName = clone._reActionName;
            _dPosition = clone._dPosition;
            _dRotation = clone._dRotation;
            _damage = clone._damage;
            _nextKickMove = clone._nextKickMove;
            _nextPunchMove = clone._nextPunchMove;

        }
        public bool hasValue()
        {
            return (ActionName == null || ActionName.Length == 0);
        }
        public Move getMove(Strike strike)
        {
            if(strike == Strike.PUNCH)
            {
                return NextPunchMove;
            }
            return NextKickMove;
        }
    }
}
